package a16_visitor;

import java.util.ArrayList;
import java.util.List;

public class Client {

	public static void main(String[] args) {
		List<Element> elelist = new ArrayList<>();
		for (int i = 0; i <= 10; i++) {
			if (i < 5) {
				elelist.add(new ConcreteElement1());
			} else {
				elelist.add(new ConcreteElement2());
			}
		}

		IVisitor visitor = new Visitor();
		for (Element e : elelist) {
			e.accept(visitor);
		}

	}

}
